
/*
===============================================================================
                    EntitySpaces Studio by EntitySpaces, LLC
             Persistence Layer and Business Objects for Microsoft .NET
             EntitySpaces(TM) is a legal trademark of EntitySpaces, LLC
                          http://www.entityspaces.net
===============================================================================
EntitySpaces Version : 2012.1.0930.0
EntitySpaces Driver  : SQL
Date Generated       : 2016/8/28 9:23:10
===============================================================================
*/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Linq;
using System.Data;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;

using EntitySpaces.Core;
using EntitySpaces.Interfaces;
using EntitySpaces.DynamicQuery;



namespace yncTech.BusinessObjects
{
	/// <summary>
	/// Encapsulates the 'Fin_Receipt_Log' table
	/// </summary>

    [DebuggerDisplay("Data = {Debug}")]
	[Serializable]
	[DataContract]
	[KnownType(typeof(FinReceiptLog))]	
	[XmlType("FinReceiptLog")]
	public partial class FinReceiptLog : esFinReceiptLog
	{	
		[DebuggerBrowsable(DebuggerBrowsableState.RootHidden | DebuggerBrowsableState.Never)]
		protected override esEntityDebuggerView[] Debug
		{
			get { return base.Debug; }
		}

		override public esEntity CreateInstance()
		{
			return new FinReceiptLog();
		}
		
		#region Static Quick Access Methods
		static public void Delete(System.Decimal logID)
		{
			var obj = new FinReceiptLog();
			obj.LogID = logID;
			obj.AcceptChanges();
			obj.MarkAsDeleted();
			obj.Save();
		}

	    static public void Delete(System.Decimal logID, esSqlAccessType sqlAccessType)
		{
			var obj = new FinReceiptLog();
			obj.LogID = logID;
			obj.AcceptChanges();
			obj.MarkAsDeleted();
			obj.Save(sqlAccessType);
		}
		#endregion

		
					
		
	
	}



    [DebuggerDisplay("Count = {Count}")]
	[Serializable]
	[CollectionDataContract]
	[XmlType("FinReceiptLogCollection")]
	public partial class FinReceiptLogCollection : esFinReceiptLogCollection, IEnumerable<FinReceiptLog>
	{
		public FinReceiptLog FindByPrimaryKey(System.Decimal logID)
		{
			return this.SingleOrDefault(e => e.LogID == logID);
		}

		
		
		#region WCF Service Class
		
		[DataContract]
		[KnownType(typeof(FinReceiptLog))]
		public class FinReceiptLogCollectionWCFPacket : esCollectionWCFPacket<FinReceiptLogCollection>
		{
			public static implicit operator FinReceiptLogCollection(FinReceiptLogCollectionWCFPacket packet)
			{
				return packet.Collection;
			}

			public static implicit operator FinReceiptLogCollectionWCFPacket(FinReceiptLogCollection collection)
			{
				return new FinReceiptLogCollectionWCFPacket() { Collection = collection };
			}
		}
		
		#endregion
		
				
	}



    [DebuggerDisplay("Query = {Parse()}")]
	[Serializable]	
	public partial class FinReceiptLogQuery : esFinReceiptLogQuery
	{
		public FinReceiptLogQuery():this("FinReceiptLogQuery")
		{
		}
		public FinReceiptLogQuery(string joinAlias)
		{
			this.es.JoinAlias = joinAlias;
		}	

		override protected string GetQueryName()
		{
			return "FinReceiptLogQuery";
		}
		
					
	
		#region Explicit Casts
		
		public static explicit operator string(FinReceiptLogQuery query)
		{
			return FinReceiptLogQuery.SerializeHelper.ToXml(query);
		}

		public static explicit operator FinReceiptLogQuery(string query)
		{
			return (FinReceiptLogQuery)FinReceiptLogQuery.SerializeHelper.FromXml(query, typeof(FinReceiptLogQuery));
		}
		
		#endregion		
	}

	[DataContract]
	[Serializable]
	abstract public partial class esFinReceiptLog : esEntity
	{
		public esFinReceiptLog()
		{

		}
		
		#region LoadByPrimaryKey
		public virtual bool LoadByPrimaryKey(System.Decimal logID)
		{
			if(this.es.Connection.SqlAccessType == esSqlAccessType.DynamicSQL)
				return LoadByPrimaryKeyDynamic(logID);
			else
				return LoadByPrimaryKeyStoredProcedure(logID);
		}

		public virtual bool LoadByPrimaryKey(esSqlAccessType sqlAccessType, System.Decimal logID)
		{
			if (sqlAccessType == esSqlAccessType.DynamicSQL)
				return LoadByPrimaryKeyDynamic(logID);
			else
				return LoadByPrimaryKeyStoredProcedure(logID);
		}

		private bool LoadByPrimaryKeyDynamic(System.Decimal logID)
		{
			FinReceiptLogQuery query = new FinReceiptLogQuery();
			query.Where(query.LogID == logID);
			return this.Load(query);
		}

		private bool LoadByPrimaryKeyStoredProcedure(System.Decimal logID)
		{
			esParameters parms = new esParameters();
			parms.Add("LogID", logID);
			return this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms);
		}
		#endregion
		
		#region Properties
		
		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.LogID
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Decimal? LogID
		{
			get
			{
				return base.GetSystemDecimal(FinReceiptLogMetadata.ColumnNames.LogID);
			}
			
			set
			{
				if(base.SetSystemDecimal(FinReceiptLogMetadata.ColumnNames.LogID, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.LogID);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.ReceiptID
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Decimal? ReceiptID
		{
			get
			{
				return base.GetSystemDecimal(FinReceiptLogMetadata.ColumnNames.ReceiptID);
			}
			
			set
			{
				if(base.SetSystemDecimal(FinReceiptLogMetadata.ColumnNames.ReceiptID, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ReceiptID);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.DocumentsNo
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String DocumentsNo
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentsNo);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentsNo, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.DocumentsNo);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.Reference
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String Reference
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.Reference);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.Reference, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.Reference);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.ReferenceKey
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String ReferenceKey
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.ReferenceKey);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.ReferenceKey, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ReferenceKey);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.DocumentsType
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String DocumentsType
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentsType);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentsType, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.DocumentsType);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.PostingDate
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? PostingDate
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.PostingDate);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.PostingDate, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.PostingDate);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.CompanyCode
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String CompanyCode
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.CompanyCode);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.CompanyCode, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.CompanyCode);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.RevesedBy
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String RevesedBy
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.RevesedBy);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.RevesedBy, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.RevesedBy);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.ReverseDate
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? ReverseDate
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.ReverseDate);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.ReverseDate, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ReverseDate);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.UserName
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String UserName
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.UserName);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.UserName, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.UserName);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.DocumentHeaderText
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String DocumentHeaderText
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentHeaderText);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentHeaderText, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.DocumentHeaderText);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.DocumentDate
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? DocumentDate
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.DocumentDate);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.DocumentDate, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.DocumentDate);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.ReferenceTransact
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String ReferenceTransact
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.ReferenceTransact);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.ReferenceTransact, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ReferenceTransact);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.LogicalSystem
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String LogicalSystem
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.LogicalSystem);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.LogicalSystem, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.LogicalSystem);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.FunctionDept
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String FunctionDept
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.FunctionDept);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.FunctionDept, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.FunctionDept);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.StorageStatus
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String StorageStatus
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.StorageStatus);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.StorageStatus, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.StorageStatus);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.StorageLocation
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Decimal? StorageLocation
		{
			get
			{
				return base.GetSystemDecimal(FinReceiptLogMetadata.ColumnNames.StorageLocation);
			}
			
			set
			{
				if(base.SetSystemDecimal(FinReceiptLogMetadata.ColumnNames.StorageLocation, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.StorageLocation);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.SupplierBarcode
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String SupplierBarcode
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.SupplierBarcode);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.SupplierBarcode, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.SupplierBarcode);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.IsSAP
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Boolean? IsSAP
		{
			get
			{
				return base.GetSystemBoolean(FinReceiptLogMetadata.ColumnNames.IsSAP);
			}
			
			set
			{
				if(base.SetSystemBoolean(FinReceiptLogMetadata.ColumnNames.IsSAP, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.IsSAP);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.Comments
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String Comments
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.Comments);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.Comments, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.Comments);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.IsConfirmed
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Boolean? IsConfirmed
		{
			get
			{
				return base.GetSystemBoolean(FinReceiptLogMetadata.ColumnNames.IsConfirmed);
			}
			
			set
			{
				if(base.SetSystemBoolean(FinReceiptLogMetadata.ColumnNames.IsConfirmed, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.IsConfirmed);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.ConfirmedBy
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String ConfirmedBy
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.ConfirmedBy);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.ConfirmedBy, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ConfirmedBy);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.ConfirmedDttm
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? ConfirmedDttm
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.ConfirmedDttm);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.ConfirmedDttm, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ConfirmedDttm);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.Division
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String Division
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.Division);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.Division, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.Division);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.FirstStorageDate
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? FirstStorageDate
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.FirstStorageDate);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.FirstStorageDate, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.FirstStorageDate);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.VoucherDate
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String VoucherDate
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.VoucherDate);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.VoucherDate, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.VoucherDate);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.VoucherDescription
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String VoucherDescription
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.VoucherDescription);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.VoucherDescription, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.VoucherDescription);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.TransferRecord
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Int32? TransferRecord
		{
			get
			{
				return base.GetSystemInt32(FinReceiptLogMetadata.ColumnNames.TransferRecord);
			}
			
			set
			{
				if(base.SetSystemInt32(FinReceiptLogMetadata.ColumnNames.TransferRecord, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.TransferRecord);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.LastTransferDate
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? LastTransferDate
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.LastTransferDate);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.LastTransferDate, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.LastTransferDate);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.DocumentSystem
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String DocumentSystem
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentSystem);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.DocumentSystem, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.DocumentSystem);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.CreatedBy
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String CreatedBy
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.CreatedBy);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.CreatedBy, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.CreatedBy);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.CreatedDttm
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? CreatedDttm
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.CreatedDttm);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.CreatedDttm, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.CreatedDttm);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.UpdatedBy
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String UpdatedBy
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.UpdatedBy);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.UpdatedBy, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.UpdatedBy);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.UpdatedDttm
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.DateTime? UpdatedDttm
		{
			get
			{
				return base.GetSystemDateTime(FinReceiptLogMetadata.ColumnNames.UpdatedDttm);
			}
			
			set
			{
				if(base.SetSystemDateTime(FinReceiptLogMetadata.ColumnNames.UpdatedDttm, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.UpdatedDttm);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.VersionNo
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Int32? VersionNo
		{
			get
			{
				return base.GetSystemInt32(FinReceiptLogMetadata.ColumnNames.VersionNo);
			}
			
			set
			{
				if(base.SetSystemInt32(FinReceiptLogMetadata.ColumnNames.VersionNo, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.VersionNo);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.TransactionID
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.String TransactionID
		{
			get
			{
				return base.GetSystemString(FinReceiptLogMetadata.ColumnNames.TransactionID);
			}
			
			set
			{
				if(base.SetSystemString(FinReceiptLogMetadata.ColumnNames.TransactionID, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.TransactionID);
				}
			}
		}		
		
		/// <summary>
		/// Maps to Fin_Receipt_Log.BoxID
		/// </summary>
		[DataMember(EmitDefaultValue=false)]
		virtual public System.Decimal? BoxID
		{
			get
			{
				return base.GetSystemDecimal(FinReceiptLogMetadata.ColumnNames.BoxID);
			}
			
			set
			{
				if(base.SetSystemDecimal(FinReceiptLogMetadata.ColumnNames.BoxID, value))
				{
					OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.BoxID);
				}
			}
		}		
		
		#endregion	

		#region .str() Properties
		
		public override void SetProperties(IDictionary values)
		{
			foreach (string propertyName in values.Keys)
			{
				this.SetProperty(propertyName, values[propertyName]);
			}
		}
		
		public override void SetProperty(string name, object value)
		{
			esColumnMetadata col = this.Meta.Columns.FindByPropertyName(name);
			if (col != null)
			{
				if(value == null || value is System.String)
				{				
					// Use the strongly typed property
					switch (name)
					{							
						case "LogID": this.str().LogID = (string)value; break;							
						case "ReceiptID": this.str().ReceiptID = (string)value; break;							
						case "DocumentsNo": this.str().DocumentsNo = (string)value; break;							
						case "Reference": this.str().Reference = (string)value; break;							
						case "ReferenceKey": this.str().ReferenceKey = (string)value; break;							
						case "DocumentsType": this.str().DocumentsType = (string)value; break;							
						case "PostingDate": this.str().PostingDate = (string)value; break;							
						case "CompanyCode": this.str().CompanyCode = (string)value; break;							
						case "RevesedBy": this.str().RevesedBy = (string)value; break;							
						case "ReverseDate": this.str().ReverseDate = (string)value; break;							
						case "UserName": this.str().UserName = (string)value; break;							
						case "DocumentHeaderText": this.str().DocumentHeaderText = (string)value; break;							
						case "DocumentDate": this.str().DocumentDate = (string)value; break;							
						case "ReferenceTransact": this.str().ReferenceTransact = (string)value; break;							
						case "LogicalSystem": this.str().LogicalSystem = (string)value; break;							
						case "FunctionDept": this.str().FunctionDept = (string)value; break;							
						case "StorageStatus": this.str().StorageStatus = (string)value; break;							
						case "StorageLocation": this.str().StorageLocation = (string)value; break;							
						case "SupplierBarcode": this.str().SupplierBarcode = (string)value; break;							
						case "IsSAP": this.str().IsSAP = (string)value; break;							
						case "Comments": this.str().Comments = (string)value; break;							
						case "IsConfirmed": this.str().IsConfirmed = (string)value; break;							
						case "ConfirmedBy": this.str().ConfirmedBy = (string)value; break;							
						case "ConfirmedDttm": this.str().ConfirmedDttm = (string)value; break;							
						case "Division": this.str().Division = (string)value; break;							
						case "FirstStorageDate": this.str().FirstStorageDate = (string)value; break;							
						case "VoucherDate": this.str().VoucherDate = (string)value; break;							
						case "VoucherDescription": this.str().VoucherDescription = (string)value; break;							
						case "TransferRecord": this.str().TransferRecord = (string)value; break;							
						case "LastTransferDate": this.str().LastTransferDate = (string)value; break;							
						case "DocumentSystem": this.str().DocumentSystem = (string)value; break;							
						case "CreatedBy": this.str().CreatedBy = (string)value; break;							
						case "CreatedDttm": this.str().CreatedDttm = (string)value; break;							
						case "UpdatedBy": this.str().UpdatedBy = (string)value; break;							
						case "UpdatedDttm": this.str().UpdatedDttm = (string)value; break;							
						case "VersionNo": this.str().VersionNo = (string)value; break;							
						case "TransactionID": this.str().TransactionID = (string)value; break;							
						case "BoxID": this.str().BoxID = (string)value; break;
					}
				}
				else
				{
					switch (name)
					{	
						case "LogID":
						
							if (value == null || value is System.Decimal)
								this.LogID = (System.Decimal?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.LogID);
							break;
						
						case "ReceiptID":
						
							if (value == null || value is System.Decimal)
								this.ReceiptID = (System.Decimal?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ReceiptID);
							break;
						
						case "PostingDate":
						
							if (value == null || value is System.DateTime)
								this.PostingDate = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.PostingDate);
							break;
						
						case "ReverseDate":
						
							if (value == null || value is System.DateTime)
								this.ReverseDate = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ReverseDate);
							break;
						
						case "DocumentDate":
						
							if (value == null || value is System.DateTime)
								this.DocumentDate = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.DocumentDate);
							break;
						
						case "StorageLocation":
						
							if (value == null || value is System.Decimal)
								this.StorageLocation = (System.Decimal?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.StorageLocation);
							break;
						
						case "IsSAP":
						
							if (value == null || value is System.Boolean)
								this.IsSAP = (System.Boolean?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.IsSAP);
							break;
						
						case "IsConfirmed":
						
							if (value == null || value is System.Boolean)
								this.IsConfirmed = (System.Boolean?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.IsConfirmed);
							break;
						
						case "ConfirmedDttm":
						
							if (value == null || value is System.DateTime)
								this.ConfirmedDttm = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.ConfirmedDttm);
							break;
						
						case "FirstStorageDate":
						
							if (value == null || value is System.DateTime)
								this.FirstStorageDate = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.FirstStorageDate);
							break;
						
						case "TransferRecord":
						
							if (value == null || value is System.Int32)
								this.TransferRecord = (System.Int32?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.TransferRecord);
							break;
						
						case "LastTransferDate":
						
							if (value == null || value is System.DateTime)
								this.LastTransferDate = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.LastTransferDate);
							break;
						
						case "CreatedDttm":
						
							if (value == null || value is System.DateTime)
								this.CreatedDttm = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.CreatedDttm);
							break;
						
						case "UpdatedDttm":
						
							if (value == null || value is System.DateTime)
								this.UpdatedDttm = (System.DateTime?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.UpdatedDttm);
							break;
						
						case "VersionNo":
						
							if (value == null || value is System.Int32)
								this.VersionNo = (System.Int32?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.VersionNo);
							break;
						
						case "BoxID":
						
							if (value == null || value is System.Decimal)
								this.BoxID = (System.Decimal?)value;
								OnPropertyChanged(FinReceiptLogMetadata.PropertyNames.BoxID);
							break;
					

						default:
							break;
					}
				}
			}
            else if (this.ContainsColumn(name))
            {
                this.SetColumn(name, value);
            }
			else
			{
				throw new Exception("SetProperty Error: '" + name + "' not found");
			}
		}		

		public esStrings str()
		{
			if (esstrings == null)
			{
				esstrings = new esStrings(this);
			}
			return esstrings;
		}

		sealed public class esStrings
		{
			public esStrings(esFinReceiptLog entity)
			{
				this.entity = entity;
			}
			
	
			public System.String LogID
			{
				get
				{
					System.Decimal? data = entity.LogID;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.LogID = null;
					else entity.LogID = Convert.ToDecimal(value);
				}
			}
				
			public System.String ReceiptID
			{
				get
				{
					System.Decimal? data = entity.ReceiptID;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.ReceiptID = null;
					else entity.ReceiptID = Convert.ToDecimal(value);
				}
			}
				
			public System.String DocumentsNo
			{
				get
				{
					System.String data = entity.DocumentsNo;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.DocumentsNo = null;
					else entity.DocumentsNo = Convert.ToString(value);
				}
			}
				
			public System.String Reference
			{
				get
				{
					System.String data = entity.Reference;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.Reference = null;
					else entity.Reference = Convert.ToString(value);
				}
			}
				
			public System.String ReferenceKey
			{
				get
				{
					System.String data = entity.ReferenceKey;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.ReferenceKey = null;
					else entity.ReferenceKey = Convert.ToString(value);
				}
			}
				
			public System.String DocumentsType
			{
				get
				{
					System.String data = entity.DocumentsType;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.DocumentsType = null;
					else entity.DocumentsType = Convert.ToString(value);
				}
			}
				
			public System.String PostingDate
			{
				get
				{
					System.DateTime? data = entity.PostingDate;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.PostingDate = null;
					else entity.PostingDate = Convert.ToDateTime(value);
				}
			}
				
			public System.String CompanyCode
			{
				get
				{
					System.String data = entity.CompanyCode;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.CompanyCode = null;
					else entity.CompanyCode = Convert.ToString(value);
				}
			}
				
			public System.String RevesedBy
			{
				get
				{
					System.String data = entity.RevesedBy;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.RevesedBy = null;
					else entity.RevesedBy = Convert.ToString(value);
				}
			}
				
			public System.String ReverseDate
			{
				get
				{
					System.DateTime? data = entity.ReverseDate;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.ReverseDate = null;
					else entity.ReverseDate = Convert.ToDateTime(value);
				}
			}
				
			public System.String UserName
			{
				get
				{
					System.String data = entity.UserName;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.UserName = null;
					else entity.UserName = Convert.ToString(value);
				}
			}
				
			public System.String DocumentHeaderText
			{
				get
				{
					System.String data = entity.DocumentHeaderText;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.DocumentHeaderText = null;
					else entity.DocumentHeaderText = Convert.ToString(value);
				}
			}
				
			public System.String DocumentDate
			{
				get
				{
					System.DateTime? data = entity.DocumentDate;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.DocumentDate = null;
					else entity.DocumentDate = Convert.ToDateTime(value);
				}
			}
				
			public System.String ReferenceTransact
			{
				get
				{
					System.String data = entity.ReferenceTransact;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.ReferenceTransact = null;
					else entity.ReferenceTransact = Convert.ToString(value);
				}
			}
				
			public System.String LogicalSystem
			{
				get
				{
					System.String data = entity.LogicalSystem;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.LogicalSystem = null;
					else entity.LogicalSystem = Convert.ToString(value);
				}
			}
				
			public System.String FunctionDept
			{
				get
				{
					System.String data = entity.FunctionDept;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.FunctionDept = null;
					else entity.FunctionDept = Convert.ToString(value);
				}
			}
				
			public System.String StorageStatus
			{
				get
				{
					System.String data = entity.StorageStatus;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.StorageStatus = null;
					else entity.StorageStatus = Convert.ToString(value);
				}
			}
				
			public System.String StorageLocation
			{
				get
				{
					System.Decimal? data = entity.StorageLocation;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.StorageLocation = null;
					else entity.StorageLocation = Convert.ToDecimal(value);
				}
			}
				
			public System.String SupplierBarcode
			{
				get
				{
					System.String data = entity.SupplierBarcode;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.SupplierBarcode = null;
					else entity.SupplierBarcode = Convert.ToString(value);
				}
			}
				
			public System.String IsSAP
			{
				get
				{
					System.Boolean? data = entity.IsSAP;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.IsSAP = null;
					else entity.IsSAP = Convert.ToBoolean(value);
				}
			}
				
			public System.String Comments
			{
				get
				{
					System.String data = entity.Comments;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.Comments = null;
					else entity.Comments = Convert.ToString(value);
				}
			}
				
			public System.String IsConfirmed
			{
				get
				{
					System.Boolean? data = entity.IsConfirmed;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.IsConfirmed = null;
					else entity.IsConfirmed = Convert.ToBoolean(value);
				}
			}
				
			public System.String ConfirmedBy
			{
				get
				{
					System.String data = entity.ConfirmedBy;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.ConfirmedBy = null;
					else entity.ConfirmedBy = Convert.ToString(value);
				}
			}
				
			public System.String ConfirmedDttm
			{
				get
				{
					System.DateTime? data = entity.ConfirmedDttm;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.ConfirmedDttm = null;
					else entity.ConfirmedDttm = Convert.ToDateTime(value);
				}
			}
				
			public System.String Division
			{
				get
				{
					System.String data = entity.Division;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.Division = null;
					else entity.Division = Convert.ToString(value);
				}
			}
				
			public System.String FirstStorageDate
			{
				get
				{
					System.DateTime? data = entity.FirstStorageDate;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.FirstStorageDate = null;
					else entity.FirstStorageDate = Convert.ToDateTime(value);
				}
			}
				
			public System.String VoucherDate
			{
				get
				{
					System.String data = entity.VoucherDate;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.VoucherDate = null;
					else entity.VoucherDate = Convert.ToString(value);
				}
			}
				
			public System.String VoucherDescription
			{
				get
				{
					System.String data = entity.VoucherDescription;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.VoucherDescription = null;
					else entity.VoucherDescription = Convert.ToString(value);
				}
			}
				
			public System.String TransferRecord
			{
				get
				{
					System.Int32? data = entity.TransferRecord;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.TransferRecord = null;
					else entity.TransferRecord = Convert.ToInt32(value);
				}
			}
				
			public System.String LastTransferDate
			{
				get
				{
					System.DateTime? data = entity.LastTransferDate;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.LastTransferDate = null;
					else entity.LastTransferDate = Convert.ToDateTime(value);
				}
			}
				
			public System.String DocumentSystem
			{
				get
				{
					System.String data = entity.DocumentSystem;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.DocumentSystem = null;
					else entity.DocumentSystem = Convert.ToString(value);
				}
			}
				
			public System.String CreatedBy
			{
				get
				{
					System.String data = entity.CreatedBy;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.CreatedBy = null;
					else entity.CreatedBy = Convert.ToString(value);
				}
			}
				
			public System.String CreatedDttm
			{
				get
				{
					System.DateTime? data = entity.CreatedDttm;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.CreatedDttm = null;
					else entity.CreatedDttm = Convert.ToDateTime(value);
				}
			}
				
			public System.String UpdatedBy
			{
				get
				{
					System.String data = entity.UpdatedBy;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.UpdatedBy = null;
					else entity.UpdatedBy = Convert.ToString(value);
				}
			}
				
			public System.String UpdatedDttm
			{
				get
				{
					System.DateTime? data = entity.UpdatedDttm;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.UpdatedDttm = null;
					else entity.UpdatedDttm = Convert.ToDateTime(value);
				}
			}
				
			public System.String VersionNo
			{
				get
				{
					System.Int32? data = entity.VersionNo;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.VersionNo = null;
					else entity.VersionNo = Convert.ToInt32(value);
				}
			}
				
			public System.String TransactionID
			{
				get
				{
					System.String data = entity.TransactionID;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.TransactionID = null;
					else entity.TransactionID = Convert.ToString(value);
				}
			}
				
			public System.String BoxID
			{
				get
				{
					System.Decimal? data = entity.BoxID;
					return (data == null) ? String.Empty : Convert.ToString(data);
				}

				set
				{
					if (value == null || value.Length == 0) entity.BoxID = null;
					else entity.BoxID = Convert.ToDecimal(value);
				}
			}
			

			private esFinReceiptLog entity;
		}
		
		[NonSerialized]
		private esStrings esstrings;		
		
		#endregion
		
		#region Housekeeping methods

		override protected IMetadata Meta
		{
			get
			{
				return FinReceiptLogMetadata.Meta();
			}
		}

		#endregion		
		
		#region Query Logic

		public FinReceiptLogQuery Query
		{
			get
			{
				if (this.query == null)
				{
					this.query = new FinReceiptLogQuery();
					InitQuery(this.query);
				}

				return this.query;
			}
		}

		public bool Load(FinReceiptLogQuery query)
		{
			this.query = query;
			InitQuery(this.query);
			return this.Query.Load();
		}
		
		protected void InitQuery(FinReceiptLogQuery query)
		{
			query.OnLoadDelegate = this.OnQueryLoaded;
			
			if (!query.es2.HasConnection)
			{
				query.es2.Connection = ((IEntity)this).Connection;
			}			
		}

		#endregion
		
        [IgnoreDataMember]
		private FinReceiptLogQuery query;		
	}



	[Serializable]
	abstract public partial class esFinReceiptLogCollection : esEntityCollection<FinReceiptLog>
	{
		#region Housekeeping methods
		override protected IMetadata Meta
		{
			get
			{
				return FinReceiptLogMetadata.Meta();
			}
		}

		protected override string GetCollectionName()
		{
			return "FinReceiptLogCollection";
		}

		#endregion		
		
		#region Query Logic

	#if (!WindowsCE)
		[BrowsableAttribute(false)]
	#endif
		public FinReceiptLogQuery Query
		{
			get
			{
				if (this.query == null)
				{
					this.query = new FinReceiptLogQuery();
					InitQuery(this.query);
				}

				return this.query;
			}
		}

		public bool Load(FinReceiptLogQuery query)
		{
			this.query = query;
			InitQuery(this.query);
			return Query.Load();
		}

		override protected esDynamicQuery GetDynamicQuery()
		{
			if (this.query == null)
			{
				this.query = new FinReceiptLogQuery();
				this.InitQuery(query);
			}
			return this.query;
		}

		protected void InitQuery(FinReceiptLogQuery query)
		{
			query.OnLoadDelegate = this.OnQueryLoaded;
			
			if (!query.es2.HasConnection)
			{
				query.es2.Connection = ((IEntityCollection)this).Connection;
			}			
		}

		protected override void HookupQuery(esDynamicQuery query)
		{
			this.InitQuery((FinReceiptLogQuery)query);
		}

		#endregion
		
		private FinReceiptLogQuery query;
	}



	[Serializable]
	abstract public partial class esFinReceiptLogQuery : esDynamicQuery
	{
		override protected IMetadata Meta
		{
			get
			{
				return FinReceiptLogMetadata.Meta();
			}
		}	
		
		#region QueryItemFromName
		
        protected override esQueryItem QueryItemFromName(string name)
        {
            switch (name)
            {
				case "LogID": return this.LogID;
				case "ReceiptID": return this.ReceiptID;
				case "DocumentsNo": return this.DocumentsNo;
				case "Reference": return this.Reference;
				case "ReferenceKey": return this.ReferenceKey;
				case "DocumentsType": return this.DocumentsType;
				case "PostingDate": return this.PostingDate;
				case "CompanyCode": return this.CompanyCode;
				case "RevesedBy": return this.RevesedBy;
				case "ReverseDate": return this.ReverseDate;
				case "UserName": return this.UserName;
				case "DocumentHeaderText": return this.DocumentHeaderText;
				case "DocumentDate": return this.DocumentDate;
				case "ReferenceTransact": return this.ReferenceTransact;
				case "LogicalSystem": return this.LogicalSystem;
				case "FunctionDept": return this.FunctionDept;
				case "StorageStatus": return this.StorageStatus;
				case "StorageLocation": return this.StorageLocation;
				case "SupplierBarcode": return this.SupplierBarcode;
				case "IsSAP": return this.IsSAP;
				case "Comments": return this.Comments;
				case "IsConfirmed": return this.IsConfirmed;
				case "ConfirmedBy": return this.ConfirmedBy;
				case "ConfirmedDttm": return this.ConfirmedDttm;
				case "Division": return this.Division;
				case "FirstStorageDate": return this.FirstStorageDate;
				case "VoucherDate": return this.VoucherDate;
				case "VoucherDescription": return this.VoucherDescription;
				case "TransferRecord": return this.TransferRecord;
				case "LastTransferDate": return this.LastTransferDate;
				case "DocumentSystem": return this.DocumentSystem;
				case "CreatedBy": return this.CreatedBy;
				case "CreatedDttm": return this.CreatedDttm;
				case "UpdatedBy": return this.UpdatedBy;
				case "UpdatedDttm": return this.UpdatedDttm;
				case "VersionNo": return this.VersionNo;
				case "TransactionID": return this.TransactionID;
				case "BoxID": return this.BoxID;

                default: return null;
            }
        }		
		
		#endregion
		
		#region esQueryItems

		public esQueryItem LogID
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.LogID, esSystemType.Decimal); }
		} 
		
		public esQueryItem ReceiptID
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.ReceiptID, esSystemType.Decimal); }
		} 
		
		public esQueryItem DocumentsNo
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.DocumentsNo, esSystemType.String); }
		} 
		
		public esQueryItem Reference
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.Reference, esSystemType.String); }
		} 
		
		public esQueryItem ReferenceKey
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.ReferenceKey, esSystemType.String); }
		} 
		
		public esQueryItem DocumentsType
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.DocumentsType, esSystemType.String); }
		} 
		
		public esQueryItem PostingDate
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.PostingDate, esSystemType.DateTime); }
		} 
		
		public esQueryItem CompanyCode
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.CompanyCode, esSystemType.String); }
		} 
		
		public esQueryItem RevesedBy
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.RevesedBy, esSystemType.String); }
		} 
		
		public esQueryItem ReverseDate
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.ReverseDate, esSystemType.DateTime); }
		} 
		
		public esQueryItem UserName
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.UserName, esSystemType.String); }
		} 
		
		public esQueryItem DocumentHeaderText
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.DocumentHeaderText, esSystemType.String); }
		} 
		
		public esQueryItem DocumentDate
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.DocumentDate, esSystemType.DateTime); }
		} 
		
		public esQueryItem ReferenceTransact
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.ReferenceTransact, esSystemType.String); }
		} 
		
		public esQueryItem LogicalSystem
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.LogicalSystem, esSystemType.String); }
		} 
		
		public esQueryItem FunctionDept
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.FunctionDept, esSystemType.String); }
		} 
		
		public esQueryItem StorageStatus
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.StorageStatus, esSystemType.String); }
		} 
		
		public esQueryItem StorageLocation
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.StorageLocation, esSystemType.Decimal); }
		} 
		
		public esQueryItem SupplierBarcode
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.SupplierBarcode, esSystemType.String); }
		} 
		
		public esQueryItem IsSAP
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.IsSAP, esSystemType.Boolean); }
		} 
		
		public esQueryItem Comments
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.Comments, esSystemType.String); }
		} 
		
		public esQueryItem IsConfirmed
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.IsConfirmed, esSystemType.Boolean); }
		} 
		
		public esQueryItem ConfirmedBy
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.ConfirmedBy, esSystemType.String); }
		} 
		
		public esQueryItem ConfirmedDttm
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.ConfirmedDttm, esSystemType.DateTime); }
		} 
		
		public esQueryItem Division
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.Division, esSystemType.String); }
		} 
		
		public esQueryItem FirstStorageDate
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.FirstStorageDate, esSystemType.DateTime); }
		} 
		
		public esQueryItem VoucherDate
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.VoucherDate, esSystemType.String); }
		} 
		
		public esQueryItem VoucherDescription
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.VoucherDescription, esSystemType.String); }
		} 
		
		public esQueryItem TransferRecord
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.TransferRecord, esSystemType.Int32); }
		} 
		
		public esQueryItem LastTransferDate
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.LastTransferDate, esSystemType.DateTime); }
		} 
		
		public esQueryItem DocumentSystem
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.DocumentSystem, esSystemType.String); }
		} 
		
		public esQueryItem CreatedBy
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.CreatedBy, esSystemType.String); }
		} 
		
		public esQueryItem CreatedDttm
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.CreatedDttm, esSystemType.DateTime); }
		} 
		
		public esQueryItem UpdatedBy
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.UpdatedBy, esSystemType.String); }
		} 
		
		public esQueryItem UpdatedDttm
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.UpdatedDttm, esSystemType.DateTime); }
		} 
		
		public esQueryItem VersionNo
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.VersionNo, esSystemType.Int32); }
		} 
		
		public esQueryItem TransactionID
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.TransactionID, esSystemType.String); }
		} 
		
		public esQueryItem BoxID
		{
			get { return new esQueryItem(this, FinReceiptLogMetadata.ColumnNames.BoxID, esSystemType.Decimal); }
		} 
		
		#endregion
		
	}


	
	public partial class FinReceiptLog : esFinReceiptLog
	{

		
		
	}
	



	[Serializable]
	public partial class FinReceiptLogMetadata : esMetadata, IMetadata
	{
		#region Protected Constructor
		protected FinReceiptLogMetadata()
		{
			m_columns = new esColumnMetadataCollection();
			esColumnMetadata c;

			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.LogID, 0, typeof(System.Decimal), esSystemType.Decimal);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.LogID;
			c.IsInPrimaryKey = true;
			c.IsAutoIncrement = true;
			c.NumericPrecision = 18;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.ReceiptID, 1, typeof(System.Decimal), esSystemType.Decimal);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.ReceiptID;
			c.NumericPrecision = 18;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.DocumentsNo, 2, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.DocumentsNo;
			c.CharacterMaxLength = 40;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.Reference, 3, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.Reference;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.ReferenceKey, 4, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.ReferenceKey;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.DocumentsType, 5, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.DocumentsType;
			c.CharacterMaxLength = 20;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.PostingDate, 6, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.PostingDate;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.CompanyCode, 7, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.CompanyCode;
			c.CharacterMaxLength = 30;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.RevesedBy, 8, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.RevesedBy;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.ReverseDate, 9, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.ReverseDate;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.UserName, 10, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.UserName;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.DocumentHeaderText, 11, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.DocumentHeaderText;
			c.CharacterMaxLength = 200;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.DocumentDate, 12, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.DocumentDate;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.ReferenceTransact, 13, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.ReferenceTransact;
			c.CharacterMaxLength = 20;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.LogicalSystem, 14, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.LogicalSystem;
			c.CharacterMaxLength = 20;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.FunctionDept, 15, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.FunctionDept;
			c.CharacterMaxLength = 20;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.StorageStatus, 16, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.StorageStatus;
			c.CharacterMaxLength = 20;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.StorageLocation, 17, typeof(System.Decimal), esSystemType.Decimal);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.StorageLocation;
			c.NumericPrecision = 18;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.SupplierBarcode, 18, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.SupplierBarcode;
			c.CharacterMaxLength = 40;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.IsSAP, 19, typeof(System.Boolean), esSystemType.Boolean);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.IsSAP;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.Comments, 20, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.Comments;
			c.CharacterMaxLength = 500;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.IsConfirmed, 21, typeof(System.Boolean), esSystemType.Boolean);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.IsConfirmed;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.ConfirmedBy, 22, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.ConfirmedBy;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.ConfirmedDttm, 23, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.ConfirmedDttm;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.Division, 24, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.Division;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.FirstStorageDate, 25, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.FirstStorageDate;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.VoucherDate, 26, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.VoucherDate;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.VoucherDescription, 27, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.VoucherDescription;
			c.CharacterMaxLength = 500;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.TransferRecord, 28, typeof(System.Int32), esSystemType.Int32);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.TransferRecord;
			c.NumericPrecision = 10;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.LastTransferDate, 29, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.LastTransferDate;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.DocumentSystem, 30, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.DocumentSystem;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.CreatedBy, 31, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.CreatedBy;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.CreatedDttm, 32, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.CreatedDttm;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.UpdatedBy, 33, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.UpdatedBy;
			c.CharacterMaxLength = 50;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.UpdatedDttm, 34, typeof(System.DateTime), esSystemType.DateTime);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.UpdatedDttm;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.VersionNo, 35, typeof(System.Int32), esSystemType.Int32);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.VersionNo;
			c.NumericPrecision = 10;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.TransactionID, 36, typeof(System.String), esSystemType.String);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.TransactionID;
			c.CharacterMaxLength = 36;
			c.IsNullable = true;
			m_columns.Add(c);
				
			c = new esColumnMetadata(FinReceiptLogMetadata.ColumnNames.BoxID, 37, typeof(System.Decimal), esSystemType.Decimal);
			c.PropertyName = FinReceiptLogMetadata.PropertyNames.BoxID;
			c.NumericPrecision = 18;
			c.IsNullable = true;
			m_columns.Add(c);
				
		}
		#endregion	
	
		static public FinReceiptLogMetadata Meta()
		{
			return meta;
		}	
		
		public Guid DataID
		{
			get { return base.m_dataID; }
		}	
		
		public bool MultiProviderMode
		{
			get { return false; }
		}		

		public esColumnMetadataCollection Columns
		{
			get	{ return base.m_columns; }
		}
		
		#region ColumnNames
		public class ColumnNames
		{ 
			 public const string LogID = "LogID";
			 public const string ReceiptID = "ReceiptID";
			 public const string DocumentsNo = "DocumentsNo";
			 public const string Reference = "Reference";
			 public const string ReferenceKey = "ReferenceKey";
			 public const string DocumentsType = "DocumentsType";
			 public const string PostingDate = "PostingDate";
			 public const string CompanyCode = "CompanyCode";
			 public const string RevesedBy = "RevesedBy";
			 public const string ReverseDate = "ReverseDate";
			 public const string UserName = "UserName";
			 public const string DocumentHeaderText = "DocumentHeaderText";
			 public const string DocumentDate = "DocumentDate";
			 public const string ReferenceTransact = "ReferenceTransact";
			 public const string LogicalSystem = "LogicalSystem";
			 public const string FunctionDept = "FunctionDept";
			 public const string StorageStatus = "StorageStatus";
			 public const string StorageLocation = "StorageLocation";
			 public const string SupplierBarcode = "SupplierBarcode";
			 public const string IsSAP = "IsSAP";
			 public const string Comments = "Comments";
			 public const string IsConfirmed = "IsConfirmed";
			 public const string ConfirmedBy = "ConfirmedBy";
			 public const string ConfirmedDttm = "ConfirmedDttm";
			 public const string Division = "Division";
			 public const string FirstStorageDate = "FirstStorageDate";
			 public const string VoucherDate = "VoucherDate";
			 public const string VoucherDescription = "VoucherDescription";
			 public const string TransferRecord = "TransferRecord";
			 public const string LastTransferDate = "LastTransferDate";
			 public const string DocumentSystem = "DocumentSystem";
			 public const string CreatedBy = "CreatedBy";
			 public const string CreatedDttm = "CreatedDttm";
			 public const string UpdatedBy = "UpdatedBy";
			 public const string UpdatedDttm = "UpdatedDttm";
			 public const string VersionNo = "VersionNo";
			 public const string TransactionID = "TransactionID";
			 public const string BoxID = "BoxID";
		}
		#endregion	
		
		#region PropertyNames
		public class PropertyNames
		{ 
			 public const string LogID = "LogID";
			 public const string ReceiptID = "ReceiptID";
			 public const string DocumentsNo = "DocumentsNo";
			 public const string Reference = "Reference";
			 public const string ReferenceKey = "ReferenceKey";
			 public const string DocumentsType = "DocumentsType";
			 public const string PostingDate = "PostingDate";
			 public const string CompanyCode = "CompanyCode";
			 public const string RevesedBy = "RevesedBy";
			 public const string ReverseDate = "ReverseDate";
			 public const string UserName = "UserName";
			 public const string DocumentHeaderText = "DocumentHeaderText";
			 public const string DocumentDate = "DocumentDate";
			 public const string ReferenceTransact = "ReferenceTransact";
			 public const string LogicalSystem = "LogicalSystem";
			 public const string FunctionDept = "FunctionDept";
			 public const string StorageStatus = "StorageStatus";
			 public const string StorageLocation = "StorageLocation";
			 public const string SupplierBarcode = "SupplierBarcode";
			 public const string IsSAP = "IsSAP";
			 public const string Comments = "Comments";
			 public const string IsConfirmed = "IsConfirmed";
			 public const string ConfirmedBy = "ConfirmedBy";
			 public const string ConfirmedDttm = "ConfirmedDttm";
			 public const string Division = "Division";
			 public const string FirstStorageDate = "FirstStorageDate";
			 public const string VoucherDate = "VoucherDate";
			 public const string VoucherDescription = "VoucherDescription";
			 public const string TransferRecord = "TransferRecord";
			 public const string LastTransferDate = "LastTransferDate";
			 public const string DocumentSystem = "DocumentSystem";
			 public const string CreatedBy = "CreatedBy";
			 public const string CreatedDttm = "CreatedDttm";
			 public const string UpdatedBy = "UpdatedBy";
			 public const string UpdatedDttm = "UpdatedDttm";
			 public const string VersionNo = "VersionNo";
			 public const string TransactionID = "TransactionID";
			 public const string BoxID = "BoxID";
		}
		#endregion	

		public esProviderSpecificMetadata GetProviderMetadata(string mapName)
		{
			MapToMeta mapMethod = mapDelegates[mapName];

			if (mapMethod != null)
				return mapMethod(mapName);
			else
				return null;
		}
		
		#region MAP esDefault
		
		static private int RegisterDelegateesDefault()
		{
			// This is only executed once per the life of the application
			lock (typeof(FinReceiptLogMetadata))
			{
				if(FinReceiptLogMetadata.mapDelegates == null)
				{
					FinReceiptLogMetadata.mapDelegates = new Dictionary<string,MapToMeta>();
				}
				
				if (FinReceiptLogMetadata.meta == null)
				{
					FinReceiptLogMetadata.meta = new FinReceiptLogMetadata();
				}
				
				MapToMeta mapMethod = new MapToMeta(meta.esDefault);
				mapDelegates.Add("esDefault", mapMethod);
				mapMethod("esDefault");
			}
			return 0;
		}			

		private esProviderSpecificMetadata esDefault(string mapName)
		{
			if(!m_providerMetadataMaps.ContainsKey(mapName))
			{
				esProviderSpecificMetadata meta = new esProviderSpecificMetadata();			


				meta.AddTypeMap("LogID", new esTypeMap("numeric", "System.Decimal"));
				meta.AddTypeMap("ReceiptID", new esTypeMap("numeric", "System.Decimal"));
				meta.AddTypeMap("DocumentsNo", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("Reference", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("ReferenceKey", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("DocumentsType", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("PostingDate", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("CompanyCode", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("RevesedBy", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("ReverseDate", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("UserName", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("DocumentHeaderText", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("DocumentDate", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("ReferenceTransact", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("LogicalSystem", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("FunctionDept", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("StorageStatus", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("StorageLocation", new esTypeMap("numeric", "System.Decimal"));
				meta.AddTypeMap("SupplierBarcode", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("IsSAP", new esTypeMap("bit", "System.Boolean"));
				meta.AddTypeMap("Comments", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("IsConfirmed", new esTypeMap("bit", "System.Boolean"));
				meta.AddTypeMap("ConfirmedBy", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("ConfirmedDttm", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("Division", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("FirstStorageDate", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("VoucherDate", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("VoucherDescription", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("TransferRecord", new esTypeMap("int", "System.Int32"));
				meta.AddTypeMap("LastTransferDate", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("DocumentSystem", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("CreatedBy", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("CreatedDttm", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("UpdatedBy", new esTypeMap("nvarchar", "System.String"));
				meta.AddTypeMap("UpdatedDttm", new esTypeMap("datetime", "System.DateTime"));
				meta.AddTypeMap("VersionNo", new esTypeMap("int", "System.Int32"));
				meta.AddTypeMap("TransactionID", new esTypeMap("char", "System.String"));
				meta.AddTypeMap("BoxID", new esTypeMap("numeric", "System.Decimal"));			
				
				
				
				meta.Source = "Fin_Receipt_Log";
				meta.Destination = "Fin_Receipt_Log";
				
				meta.spInsert = "proc_Fin_Receipt_LogInsert";				
				meta.spUpdate = "proc_Fin_Receipt_LogUpdate";		
				meta.spDelete = "proc_Fin_Receipt_LogDelete";
				meta.spLoadAll = "proc_Fin_Receipt_LogLoadAll";
				meta.spLoadByPrimaryKey = "proc_Fin_Receipt_LogLoadByPrimaryKey";
				
				this.m_providerMetadataMaps["esDefault"] = meta;
			}
			
			return this.m_providerMetadataMaps["esDefault"];
		}

		#endregion

		static private FinReceiptLogMetadata meta;
		static protected Dictionary<string, MapToMeta> mapDelegates;
		static private int _esDefault = RegisterDelegateesDefault();
	}
}
